package com.koalac.ironman.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;

public class MyScrollView extends ScrollView{

    public MyScrollView(Context context, AttributeSet attrs) {
	super(context, attrs);
    }

    public MyScrollView(Context context) {
	super(context);
    }
    
    @Override
	public boolean onTouchEvent(MotionEvent e) {
		if(e.getAction()==MotionEvent.ACTION_DOWN){
			
			getParent().requestDisallowInterceptTouchEvent(true);
		}else if(e.getAction()==MotionEvent.ACTION_MOVE){
			
			getParent().requestDisallowInterceptTouchEvent(true);
		}else if(e.getAction()==MotionEvent.ACTION_UP){
			
		}
		return super.onTouchEvent(e);
	}
    
    

}